package com.wybx.serivce.impl;

import com.wybx.mapper.WybzMapper;
import com.wybx.pojo.OrderInfoBO;
import com.wybx.serivce.WybzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WybzServiceImpl implements WybzService {


    @Autowired
    private WybzMapper wybzMapper;

    public List<OrderInfoBO> getOrderInfoByCreateTime(String CREATE_TIME){
        List<OrderInfoBO> orderInfoList = wybzMapper.getOrderInfoByCreateTime(CREATE_TIME);
        for (OrderInfoBO orderInfoBO : orderInfoList) {


            //物业保修才需要
            String user_name = orderInfoBO.getUSER_NAME();
            StringBuilder stringBuilder = new StringBuilder(user_name);
            stringBuilder.replace(1, 2, "*");
            user_name = stringBuilder.toString();
            orderInfoBO.setUSER_NAME(user_name);

            // 学生注册才需要
//            orderInfoBO.setTYPE_NAME("恭喜你完成注册");


        }
        return orderInfoList;
    }
}
